package ga.model;

public class Chromosome {
	String chromosome;
	int fitness;
	public static String original="To be, or not to be, that is the question: Whether 'tis nobler in the mind to suffer the "+
			"slings and arrows of outrageous fortune, or to take arms against a sea of troubles, "+
			"and, by opposing, end them.";
	
	public Chromosome(String chromosome) {
		this.chromosome=chromosome;
		calcFitness();
		
	}
	public void calcFitness(){
		fitness=0;
		for(int i=0;i<chromosome.length();i++)
			if(chromosome.charAt(i)==original.charAt(i))
				fitness++;
		
	}
	
	static Chromosome makeChromosome(){
		int size=original.length();
		String str="";
		for(int i=0;i<size;i++){
			
			
		}
		return new Chromosome(str);
			
	}
	public String getChromosome() {
		return chromosome;
	}
	public int getFitness() {
		return fitness;
	}
	
}
